<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <%@ include file="/WEB-INF/views/include/head.jsp"%> 
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <link rel="stylesheet" href="${ctxStatic}/css/list.css">
        <script>
            function  EditShop(id){
                window.location.href='${ctx}/sys/myshop/form?id='+id;
            }
        </script>
    </head>
    <body>
        <div class="myshop">
            <!-- 我的店铺 -->
            <p class="myshoptop"><spring:message code="shop_myShop"/></p>
        </div>
        <c:set value="<%=ResourcesUtil.getConfig(\"shop_styleCategory\")%>" var="shopStyleCategory" />
        <div class="myshop_middle" style="padding: 10px 35px 0 35px;">
            <div class="data clearfix">
                <div class="ch fl">
                <!-- 店铺名称-->
                    <p class="data_id_list"><spring:message code="shop_shopName"/>：</p>
                    <p class="fl txt">${shop.shopName}</p>
                </div>
                <div class="ch fr">
                <!--联系人 -->
                    <p class="data_id_list"><spring:message code="shop_contacts"/>：</p>
                    <p class="fl txt">${shop.contactPerson}</p>
                </div>
            </div>
            <div class="data clearfix">
                <div class="ch fl">
                <!-- 所在国家-->
                    <p class="data_id_list"><spring:message code="shop_hostCountry"/>：</p>
                    <p class="fl txt">${fns:getDictName(shop.shopCountry)}</p>
                </div>
                <div class="ch fr">
                    <!-- 联系电话 -->
                    <p class="data_id_list"><spring:message code="shop_contactNumber"/>：</p>
                    <p class="fl txt">${shop.contactPhone}</p>
                </div>
            </div>
            <div class="data clearfix">
                <div class="ch fl">
                    <div class="ch data clearfix">
                    <!-- 所在地区 -->
                        <p class="data_id_list"><spring:message code="shop_region"/>：</p>
                        <p class="fl txt">${fns:getDictName(shop.shopCity)}</p>
                    </div>
                    <div class="ch clearfix">
                    <!-- 店铺地址 -->
                        <p class="data_id_list"><spring:message code="shop_address"/>：</p>
                        <p class="fl txt" data-toggle="tooltip" title="${shop.shopAddress }">${shop.shopAddress}</p>
                    </div>
                </div>
                <div class="ch fr">
                    <div class="ch data clearfix">
                    <!-- 联系传真-->
                        <p class="data_id_list"><spring:message code="shop_fax"/>：</p>
                        <p class="fl txt">${shop.contactFax}</p>
                    </div>
                    <div class="ch clearfix">
                        <!-- 联系邮箱 -->
                        <p class="data_id_list"><spring:message code="shop_mailbox"/>：</p>
                        <p class="fl txt">${shop.contactEmail}</p>
                    </div>
                </div>
            </div>
            <div class="data clearfix">
                <div class="ch fl clearfix">
                    <div class="ch data clearfix">
                        <!-- 开户银号 -->
                        <p class="data_id_list"><spring:message code="shop_bankAccount"/>：</p>
                        <p class="fl txt" style="width: 420px;">${shop.bankName}</p>
                    </div>
                    <div class="ch data clearfix">
                    <!-- 银行账号 -->
                        <p class="data_id_list"><spring:message code="shop_bankAccountNO"/>：</p>
                        <p class="fl txt">${shop.bankAccountNo}</p>
                    </div>
                    <div class="ch data clearfix">
                        <!-- 经营款式 -->
                        <p class="data_id_list"><spring:message code="shop_managementStyle"/>：</p>
                        <p class="fl txt">
                            <c:forEach items="${fns:getDictList(shopStyleCategory)}" var="style">
                                <c:forEach items="${shopStyleSelectList}" var="shopStyle" >
                                    <c:if test="${fn:split(shopStyle.itemId,'-')[1] eq style.itemValue}">${style.itemName}</c:if>
                                </c:forEach>
                            </c:forEach>
                        </p>
                    </div>
                    <div class="ch clearfix">
                        <!-- 店铺简介 -->
                        <p class="data_id_list"><spring:message code="shop_shopProfile"/>：</p>
                        <p class="fl rtname" style="margin-top:0;"  data-toggle="tooltip" title="${shop.shopDiscribe }">${shop.shopDiscribe }</p>
                    </div>
                </div>
                <div class="ch fr clearfix">
                    <div class="ch_top clearfix">
                    <!-- 店铺标识 -->
                        <p class="data_id_list"><spring:message code="shop_shopLogo"/>：</p>
                        <img src="${shop.shopLogo}" width="160" height="160" class="tableImg">
                        <img src="${shop.shopLogo}" width='140' height='140' class="posImg posImg2">
                    </div>
                </div>
            </div>
        </div>
        <div class="Pre-box">
        <!-- 编辑-->
            <shiro:hasPermission name="sys:myshop:edit">
                <div class="Pre" onclick="EditShop(${shop.id})"><spring:message code="shop_edit"/></div>
            </shiro:hasPermission>
        </div>
        <script src="${ctxStatic}/layer/layerStyle.js"></script>
        <script>
            var listH = $(':root').css('height')
            $(window.parent.$("#mainFrame").css('height',listH));
        </script>
        <script>
        $(".tableImg").hover(function(){
            var thisImg = $(this).next('.posImg2');
            var thisW = $(this).width();
            var thisH = $(this).height();
            thisImg.css({
                width:thisW*2 + "px",
                height:thisH*2 + "px"
            });
            var thisImgW = thisImg.width();
            var thisImgH = thisImg.height();
            var thisImgTop = $(this).offset().top;
            var thisImgLeft = $(this).offset().left;
            thisImg.css({
                top:thisImgTop - (thisImgH - thisH)/2 + "px",
                left:thisImgLeft - (thisImgW - thisW)/2 + "px",
            })
            
            thisImg.show()
        });

        $(".posImg2").hover(function(){
//            移入
        },function(){
            $(this).hide()
        });
        </script>
    </body>
</html>